﻿
using System.Windows.Controls;

namespace Tests.UI
{
    /// <summary>
    /// Interaction logic for ToolbarTest.xaml
    /// </summary>
    public partial class ToolbarTest
    {
        public ToolbarTest()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            var o = test.Tray.Orientation;
            var orientation = o == Orientation.Horizontal ? Orientation.Vertical : Orientation.Horizontal;
            test.Orientation = orientation;
            test2.Orientation = orientation;
           
            int index = grid.Children.IndexOf(test2);
            grid.Children.Remove(test2);
            grid.Children.Insert(index, test2);
        }
    }
}
